package com.student.xujiang.myallstudent.rxjava;

import android.util.Log;

import java.util.Observable;
import java.util.Observer;

/**
 * Created by XD on 2017/3/9.
 */

public class SimpleObserver implements Observer {

    public SimpleObserver(SimpleObservable observable) {
        observable.addObserver(this);
    }
    //当被观察者状态发生改变时调用
    @Override
    public void update(Observable o, Object arg) {
        Log.i("TAG","data is changed:" + ((SimpleObservable) o).getData());
    }


}

